# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=winpwn
pkgver=411.cba1769
pkgrel=1
pkgdesc='Automation for internal Windows Penetrationtest / AD-Security.'
groups=('blackarch' 'blackarch-windows' 'blackarch-automation')
arch=('any')
url='https://github.com/S3cur3Th1sSh1t/WinPwn'
license=('BSD')
makedepends=('git')
source=("$pkgname::git+https://github.com/S3cur3Th1sSh1t/WinPwn.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/windows/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm README.md LICENSE

  cp -a * "$pkgdir/usr/share/windows/$pkgname/"
}

